package cn.lg.soar.boot.config;

import cn.lg.soar.mvc.handler.IgnoreApiClientRequestMappingHandlerMapping;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * 忽略路径映射
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Configuration
public class IgnoreMappingConfiguration {

    @Bean
    public WebMvcRegistrations clientWebRegistrations() {
        return new WebMvcRegistrations() {
            @Override
            public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
                return new IgnoreApiClientRequestMappingHandlerMapping();
            }
        };
    }

}
